package com.czk.springcloud.service;

import com.czk.springcloud.entity.CommonResult;
import com.czk.springcloud.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 远程调用
 * 微服务的接口
 *
 * @Author:ChenZhangKun
 * @Date: 2021/3/17 14:37
 */
@FeignClient(value = "nacos-payment-provider", fallback = PaymentFallBackService.class)
public interface PaymentService {
    /**
     * 请求方法
     *
     * @param id
     * @return
     */
    @GetMapping("/payment/sql/{id}")
    CommonResult<Payment> paymentSql(@PathVariable("id") Long id);
}
